import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue()],
  server: {
    port: 5173,
    proxy: {
      '/api': {
        target: 'http://localhost:8000',
        changeOrigin: true,
        ws: false,
        // keep /api prefix (backend expects it); if not, comment rewrite below
        // rewrite: (path) => path.replace(/^\/api/, ''),
      },
    },
  }
})
